package com.cyc.common.exception;

import lombok.Getter;

@Getter
public enum SystemErrorType implements ErrorType {

    SYSTEM_ERROR("500", "系统异常"),
    SYSTEM_BUSY("99999999", "系统繁忙,请稍候再试"),

    GATEWAY_NOT_FOUND_SERVICE("99990404", "服务未找到"),
    GATEWAY_METHOD_NOT_ALLOWED("99990405", "服务调用方法不支持"),
    GATEWAY_ERROR("99990502", "网关异常"),
    GATEWAY_CONNECT_TIME_OUT("99990504", "网关超时"),

    ARGUMENT_NOT_VALID("99990400", "请求参数校验不通过"),

    TOKEN_INVALID("99990401", "无效token"),
    TOKEN_EXPIRED("99990407", "token已过期"),
    TOKEN_REMOVE_ERROR("200100006","用户禁用失败"),
    TOKEN_NOT_AUTHORIZED("99990403", "无访问权限"),

    FILE_UPLOAD_FAILED("99991003", "上传失败"),
    FILE_UPLOAD_SIZE_LIMIT("99991004", "文件不能大于一兆"),
    MYSQL_DATA_ERROR("99991005","传入数据异常!"),
    FILE_UPLOAD_SIZE_SUM_LIMIT("99991006","文件不能总体大于十兆!"),

    USER_IS_NOT_FIND("200100001","当前用戶未找到"),
    ADD_USER_ERROR("200100002","新增用户错误"),
    UPDATE_USER_ERROR("200100003","修改用户错误"),
    UPDATE_USER_STATUS_ERROR("200100004","修改用户状态错误"),
    HEADER_GET_USER_ERROR("200100005","获取用户错误"),
    USER_ALREADY_EXISTS("200100006","用户已存在"),
    USER_ROLE_ADD_ERROR("200100007","角色人员添加错误"),
    USER_MENU_ADD_ERROR("200100008","角色菜单添加错误"),
    ADD_DATA_ERROR("200100009","添加错误"),
    UPDATA_DATA_ERROR("200100010","修改错误"),
    DELETE_DATA_ERROR("200100011","删除错误"),
    USER_MOBILE_Email_IS_HAVE("200100012","用户手机号或者邮箱已存在"),
    DATA_NOT_FIND_ERROR("200100013","数据未找到"),
    CONFIG_ERROR("200100014","获取配置失败"),
    TENCENT_AUTH_ERROR("200100015","腾讯授权失败"),
    CONFIG_NUM_ERROR("200100016","获取授权内容不匹配"),
    DATA_FIND_ERROR("200100017","数据查询异常"),
    TENCENT_AUTH_REFRESH_TOKEN_ERROR("200100018","腾讯刷新token失败"),
    MA_LOGIN_USER_PASS_ERROR("200100019", "邮箱/密码错误，请检查后重试"),
    FILE_NULL("200100020", "请选择上传文件"),
    FILE_UPLOAD_ERROR("200100021", "上传文件失败"),
    SAVE_DATA_NUM_ERROR("200100022", "修改个数限制,请检查"),
    OCEANENGINE_DATA_ERROR("200100023", "巨量引擎拉获取数据失败"),
    OCEANENGINE_UPADTE_COST_ERROR("200100024", "修改后的预算需在1000~9999999.99元之间！"),
    OCEANENGINE_UPADTE_COST_LESS_ERROR("200100025", "修改后的预算不能小于今日消耗！"),
    OCEANENGINE_USER_ERROR("200100026", "当前只能使用测试账户修改！"),
    DATA_AUTH_ERROR("200100027", "暂无数据权限"),
    CHECKING_NOT_DELETE("200100028", "无法删除当前选中模板"),
    CUSTOM_TEMPLATE_ADD_LIMIT_ERROR("200100029", "超过常用模板个数限制，无法添加模板"),
    ADD_TEMPLATE_ERROT("200100029", "当前模板已存在"),
    CLASS_NOT_FOUNGD("200100031", "类转换未找到")
    ;


    /**
     * 错误类型码
     */
    private String code;
    /**
     * 错误类型描述信息
     */
    private String msg;

    SystemErrorType(String code, String msg) {
        this.code = code;
        this.msg = msg;
    }
}
